package com.cc.eb.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cc.eb.mapper.EbProductMapper;
import com.cc.eb.model.EbNews;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Service
public class IndexService {
    @Resource
    private EbProductMapper ebProductMapper;
    public Map<String, Page> index(int page, int pageSize){
        //查询数据库所有商品数据
        Map<String,Page> result=new HashMap<>();
        Page page1=new Page(page,pageSize);
        Page page2=ebProductMapper.selectPage(page1,null);
        result.put("page2",page2);
        return result;
    }
}
